package com.city.repository.city;

import com.city.domain.city.CityEventType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @deprecation: 案件分类
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
public interface CityEventTypeRepository extends JpaRepository<CityEventType,Integer> {

    @Query(value = "select * from city_event_type where type_class = ?1",nativeQuery = true)
    List<CityEventType> findAllByTypeClass(int typeClass);

    @Query(value = "SELECT * from city_event_type where type=?1",nativeQuery = true)
    List<CityEventType> findByNmae(String name);


}
